import {createStore,applyMiddleware,compose} from 'redux'
import createSagaMiddleware from 'redux-saga';
import thunk from 'redux-thunk'
import reducer from '../store/reducer'
import {mysaga,mysaga1,mysaga2,mysaga3,mysaga4,mysaga5,mysaga6} from './sagas/saga'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
const sagaMiddleware = createSagaMiddleware()
const enhancer = composeEnhancers(applyMiddleware(thunk),applyMiddleware(sagaMiddleware));
const store = createStore(reducer,enhancer);
sagaMiddleware.run(mysaga);
sagaMiddleware.run(mysaga1);
sagaMiddleware.run(mysaga2);
sagaMiddleware.run(mysaga3);
sagaMiddleware.run(mysaga4);
sagaMiddleware.run(mysaga5);
sagaMiddleware.run(mysaga6);
export default store;